<div id="page-wrapper">
    <!-- /.row -->
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <span class="judul-page">Pembagian Kelas Siswa Pada <?php foreach($list_lembaga as $rows){echo $rows->nama_lembaga; } foreach ($list_th as $row) {echo  " Th. Ajaran - ".$row->th_ajaran;}?></span>
					<span class="pull-right">
                        <a href="<?php echo site_url()?>bagi_kelas" class="btn btn-primary btn-xs"><span class="glyphicon glyphicon-arrow-left"></span>&nbsp;Kembali</a>
                    </span>
                    <div class="clearfix"></div>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                      <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <th width="50">#</th>
                                <th width="80">Kelas</th>
                                <th>Wali Kelas</th>
                            </tr>
                        </thead>
                        <tbody>
						<?php 
						if(count($list)>0){
							$i = 1; 
							foreach ($list as $row) {
						?>										
                            <tr class="kursor">
                                <td><?php echo $i++ ?><a href="<?php echo site_url().'bagi_kelas/kelas/'.$row->id_atur_kelas.'/'.$id_lembaga.'/'.$id_mr_th_ajaran; ?>"></a></td>
                                <td><?php echo $row->kelas; ?></td> 
                                <td><?php echo $row->nm_pegawai; ?> <span class="badge pull-right"><?php echo $row->jml; ?></span></td> 
                            </tr>
						<?php
							}
						}else{
						?>
							<tr>
                                <td colspan="3"><center>Kelas belum diatur pada tahun ajaran ini, silahkan melakukan <a href="<?php echo site_url();?>atur_kelas">pengaturan</a>.</center></td>
							</tr>
						<?php
						}
						?>
                        </tbody>
                      </table>
                    </div>
                    <div class="clearfix"></div>
                    <center>
                    <!--<ul class="pagination">
                      <li class="disabled"><a href="#"> << </a></li>

                      <li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
                      <li><a href="#">2</a></li>
                      <li><a href="#">3</a></li>
                      <li><a href="#">4</a></li>

                      <li><a href="#"> >> </a></li>
                    </ul>-->
                    </center>
                </div>
            </div>
        </div>
    </div>
    <!-- /.row -->
</div>
<!-- /#page-wrapper -->
<script>
$("tr").click(function() {
  window.location.href = $(this).find("a").attr("href");
});
</script>